package com.daniel.gof.adapter;

/**
 * 详细说明
 *
 * @author Daniel
 * @version V1.0
 * @date 2020/5/15 14:30
 */
public class CockAdapter implements Duck {
	Cock cock;

	/**
	 * 构造传入鸡的实例
	 *
	 * @param cock
	 */
	public CockAdapter(Cock cock) {
		this.cock = cock;
	}

	@Override
	public void quack() {
		cock.gobble();
	}

	@Override
	public void fly() {
		cock.fly();
	}

	@Override
	public void swin() {
		System.out.println("鸡现在可以游泳了");
	}
}
